package com.music.mysongs.data

private const val baseUrl = "http://47.117.72.39:80/index.php/api/"

fun getApiMusicPost(uid: Int): String {//添加一条数据
    return baseUrl + "music_post?uid=$uid"
}

fun getApiAccountUpdate(uid: Int, name: String, psd: Int): String {//id查曲目
    return baseUrl + "admin_update?id=$uid&name=$name&psw=$psd"
}

fun getApiMusicDelete(musicId: Int): String {//删除一条数据
    return baseUrl + "music_delete?id=$musicId"
}

fun getApiMusicPassOrAuditList(isPass: Int): String {//1审核通过/0公示中的曲目列表
    return baseUrl + "music_list?is_pass=$isPass"
}

fun getApiMusicUidList(uid: Int): String {//用户id上传的曲目列表
    return baseUrl + "music_uid?uid=$uid"
}

fun getApiAccountMd5(psd: Int): String {//返回加密密码
    return baseUrl + "pwd_md5?password=$psd"
}

fun getApiAccountChk(name: String): String {//返回用户名的一条数据
    return baseUrl + "username_chk?username=$name"
}

fun getApiAccountReg(psd: Int, name: String): String {//注册并返回用户的一条数据
    return baseUrl + "register_save?username=$name&password=$psd"
}

//历史上的今天接口
fun getTodayHistoryApi(month: Int, day: Int): String {
    return "https://api.jisuapi.com/todayhistory/query?appkey=8b3f55ffb87900b4&month=$month&day=$day"
}